﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using MediaAutomatorLib.Configurations;
using MediaAutomatorLib.Helpers;
using MediaAutomatorLib.ExternalPrograms;

namespace MediaAutomatorLib
{
    public class MediaAutomator
    {        
        
        private readonly Configuration _configuration;

        public MediaAutomator(Configuration configuration)
        {
            _configuration = configuration;
            
        }

        #region Static members        
        public static MediaAutomator Instance(Configuration configuration)
        {            
           
            return new MediaAutomator(configuration);
        }
        #endregion


        public void RunScan()
        {        
            var mediaOrganizer = new MediaOrganizer.MediaOrganizer(_configuration);
            mediaOrganizer.Organize();                        
        }

        public void RunScan(string torrentHash)
        {
            var mediaOrganizer = new MediaOrganizer.MediaOrganizer(_configuration);
            mediaOrganizer.Organize(torrentHash);                        
            
        }



    }
}
